Flash memory controller

ABSTRACT

A flash memory controller for controlling a flash memory module includes a communication interface for receiving a first data and a second data; and a processing circuit for dynamically controlling a data writing mode of the flash memory module according to an amount of stored data in the flash memory module. If the amount of stored data in the flash memory module is less than a first threshold when the communication interface receives the first data, the processing circuit controls the flash memory module so that the first data is written into the first data block under an one-bit-per-cell mode.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a Continuation of and claims the benefit of priorityto U.S. patent application Ser. No. 15/643,501, filed on Jul. 7, 2017,which is a Continuation of U.S. patent application Ser. No. 15/235,128,filed on Aug. 12, 2016, which is a Continuation of U.S. patentapplication Ser. No. 14/983,566, filed on Dec. 30, 2015, which is aContinuation of priority to U.S. patent application Ser. No. 14/596,236,filed on Jan. 14, 2015, which is a Continuation of priority to U.S.patent application Ser. No. 13/491,377, filed on Jun. 7, 2012; whichclaims the benefit of priority to Taiwanese Patent Application No.100129676, filed on Aug. 19, 2011; the entirety of which is incorporatedherein by reference for all purposes.

BACKGROUND OF THE INVENTION 1. Field of the Invention

The present disclosure generally relates to flash memory technology and,more particularly, to a flash memory controller capable of improvingwear capacity and reliability of the flash memory module.

2. Description of the Prior Art

Flash memory is widely used in many applications, such as solid-statedisks (SSD), memory cards, digital cameras, digital video recorders,multimedia players, mobile phones, computers, and many other electronicdevices.

Flash memory may be realized by single-level cells (SLC), multi-levelcells (MLC), triple-level cells (TLC), or even higher-level cells. Flashmemory realized by the single-level cells has better performance interms of accessing speed and reliability. Flash memory realized by themulti-level cells, triple-level cells, or even higher-level cells iscapable of providing more storage capacity with lower cost, but hasworse performance than the single-level cells in terms of endurance andwear capacity.

Due to the above nature, the traditional flash memory device is not ableto provide high capacity with low cost while maintaining desirable wearcapacity and reliability.

SUMMARY OF THE INVENTION

In view of the foregoing, it can be appreciated that a substantial needexists for apparatuses that can improve the wear capacity andreliability of a flash memory device realized by the multi-level cells,triple-level cells, or even higher-level cells.

An example embodiment of a flash memory controller for controlling aflash memory module is disclosed. The flash memory module comprises aread and write circuit, a first data block, and a second data block. Theflash memory controller comprises: a communication interface forreceiving a first data and a second data; and a processing circuit,coupled with the communication interface and the flash memory module,for dynamically controlling a data writing mode of the flash memorymodule according to an amount of stored data in the flash memory module;wherein if the amount of stored data in the flash memory module is lessthan a first threshold when the communication interface receives thefirst data, the processing circuit controls the flash memory module sothat the first data is written into the first data block under anone-bit-per-cell mode, and if the amount of stored data in the flashmemory module is greater than the first threshold when the communicationinterface receives the second data, the processing circuit controls theflash memory module so that the second data is written into the seconddata block under a two-bit-per-cell mode.

Another example embodiment of a flash memory controller for controllinga flash memory module is disclosed. The flash memory module comprises aread and write circuit, a first data block, and a second data block. Theflash memory controller comprises: a communication interface forreceiving a first data; and a processing circuit, coupled with thecommunication interface and the flash memory module, for dynamicallycontrolling a data writing mode of the flash memory module according toan amount of stored data in the flash memory module; wherein if theamount of stored data in the flash memory module is less than a firstthreshold when the communication interface receives the first data, theprocessing circuit controls the flash memory module so that the firstdata is written into the first data block under an one-bit-per-cellmode, and afterwards the processing circuit controls the flash memorymodule so that at least one data stored in the first data block isrewritten into the second data block under a two-bit-per-cell mode.

Another example embodiment of a flash memory controller for controllinga flash memory module is disclosed. The flash memory module comprises aread and write circuit, a first data block, and a second data block. Theflash memory controller comprises: a communication interface forreceiving at least a first data; and a processing circuit, coupled withthe communication interface and the flash memory module, for controllingthe read and write circuit to write data into the flash memory module;wherein if an amount of stored data in the flash memory module is lessthan a first threshold when the communication interface receives thefirst data, the processing circuit controls the flash memory module sothat a program threshold voltage of at least one cell in the first datablock is configured to be within a first voltage range when writing thefirst data into the first data block.

Another example embodiment of a flash memory controller for controllinga flash memory module is disclosed. The flash memory module comprises aread and write circuit, a first data block, and a second data block. Theflash memory controller comprises: a communication interface forreceiving a first data; and a processing circuit, coupled with thecommunication interface and the flash memory module; wherein if anamount of stored data in the flash memory module is less than a firstthreshold when the communication interface receives the first data, theprocessing circuit controls the flash memory module so that a programthreshold voltage of at least one cell in the first data block isconfigured to be within a first voltage range when writing the firstdata into the first data block, and afterwards the processing circuitcontrols the flash memory module so that a program threshold voltage ofat least one cell in the second data block is configured to be within athird voltage range when writing at least one data stored in the firstdata block into the second data block, wherein the first voltage rangeis less than the third voltage range.

It is to be understood that both the foregoing general description andthe following detailed description are example and explanatory only andare not restrictive of the invention, as claimed.

These and other objectives of the present invention will no doubt becomeobvious to those of ordinary skill in the art after reading thefollowing detailed description of the preferred embodiment that isillustrated in the various figures and drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a simplified functional block diagram of a data storage systemin accordance with an example embodiment.

FIG. 2 is a simplified flowchart illustrating a method for writing datainto flash memory in accordance with a first example embodiment.

FIG. 3 is a simplified schematic diagram of program threshold voltagesof cells in a data block of FIG. 1 according to an example embodiment.

FIG. 4 is a simplified flowchart illustrating a method for writing datainto flash memory in accordance with a second example embodiment.

FIG. 5 is a simplified flowchart illustrating a method for writing datainto flash memory in accordance with a third example embodiment.

DETAILED DESCRIPTION

Reference will now be made in detail to embodiments of the invention,which are illustrated in the accompanying drawings.

The same reference numbers may be used throughout the drawings to referto the same or like parts or components/operations. Certain terms areused throughout the description and following claims to refer toparticular components. As one skilled in the art will appreciate, acomponent may be referred by different names. This document does notintend to distinguish between components that differ in name but not infunction. In the following description and in the claims, the term“comprise” is used in an open-ended fashion, and thus should beinterpreted to mean “include, but not limited to . . . ” Also, thephrase “coupled with” is intended to compass any indirect or directconnection. Accordingly, if this document mentioned that a first deviceis coupled with a second device, it means that the first device may bedirectly or indirectly connected to the second device through electricalconnections, wireless communications, optical communications, or othersignal connections with/without other intermediate devices or connectionmeans.

FIG. 1 is a simplified functional block diagram of a data storage system100 in accordance with an example embodiment. The data storage system100 comprises a host device 110, a flash memory controller 120, and aflash memory module 130. The host device 110 accesses the flash memorymodule 130 through the flash memory controller 120. The host device 110may be a computer, a card reader, a digital camera, a digital videorecorder, a mobile phone, a GPS device, or any other electronic devicecapable of using the flash memory module 130 as a storage medium. Theflash memory controller 120 comprises a recording medium 122, aprocessing circuit 124, and a communication interface 126. Thecommunication interface 126 is utilized for coupling with the hostdevice 110, so that data can be communicated between the processingcircuit 124 and the host device 110 via the communication interface 126.

The flash memory module 130 comprises a read and write circuit 132 and aplurality of data blocks 134. In one embodiment, these data blocks 134are realized by one or more TLC (triple-level cells) chips to providehigh storage capacity with lower cost. The flash memory controller 120and the flash memory module 130 may be integrated into a single memorydevice, such as a solid-state disk (SSD) or a memory card. Theoperations of writing data into the flash memory module 130 will befurther described with reference to FIG. 2 and FIG. 3.

FIG. 2 is a simplified flowchart 200 illustrating a method for writingdata into flash memory in accordance with a first example embodiment.FIG. 3 is a simplified schematic diagram 300 of program thresholdvoltages of cells in the data block 134 of FIG. 1 according to anexample embodiment.

In operation 210, the flash memory controller 120 receives data to bewritten transmitted from the host device 110 via the communicationinterface 126.

Then, the processing circuit 124 of the flash memory controller 120decides a range of program threshold voltages for cells in a target datablock for use to store the data according to an amount of stored data inthe flash memory module 130.

For example, in the embodiment of FIG. 2, the processing circuit 124performs operation 220 to determine whether the amount of stored data inthe flash memory module 130 is higher than a first threshold TH1. If theamount of stored data in the flash memory module 130 is less than thefirst threshold TH1, the processing circuit 124 proceeds to operation230. Otherwise, the processing circuit 124 proceeds to operation 240.

In operation 240, the processing circuit 124 further determines whetherthe amount of stored data in the flash memory module 130 is higher thana second threshold TH2, wherein TH2 is greater than TH1. If the amountof stored data in the flash memory module 130 is between the firstthreshold TH1 and the second threshold TH2, the processing circuit 124proceeds to operation 250. If the amount of stored data in the flashmemory module 130 is higher than the second threshold TH2, theprocessing circuit 124 proceeds to operation 260.

In implementations, the afore-mentioned first threshold TH1 and secondthreshold TH2 may be represented in the form of data amount, such as acertain number of MBs or GBs. Alternatively, the first threshold TH1 andthe second threshold TH2 may be represented in the form of percentagevalues. For example, assuming that the nominal storage capacity of theflash memory module 130 is X GBs, the first threshold TH1 and the secondthreshold TH2 may be respectively set to be 0.3×GBs and 0.6×GBs, or maybe respectively set to be 30% and 60% of the nominal storage capacity ofthe flash memory module 130.

As shown in FIG. 2, in the operation 230 the processing circuit 124selects a first voltage range to be the voltage range of programthreshold voltages for the target data block, in the operation 250 theprocessing circuit 124 selects a third voltage range to be the voltagerange of program threshold voltages for the target data block, and inthe operation 260 the processing circuit 124 selects a second voltagerange to be the voltage range of program threshold voltages for thetarget data block.

The above first voltage range is less than 50% of the second voltagerange, and the third voltage range is less than 60% of the secondvoltage range. The upper limit of the first voltage range may be lessthan 80% of the upper limit of the second voltage range. For example,the upper limit of the first voltage range may be less than 60% of theupper limit of the second voltage range, or even less than 30% of theupper limit of the second voltage range. The required power consumptionfor writing data into the cells of the data block can be reduced if theupper limit of the first voltage range is set to be lower. The upperlimit of the third voltage range may be less than 80% of the upper limitof the second voltage range, or even less than 60% of the upper limit ofthe second voltage range. Similarly, the required power consumption forwriting data into the cells of the data block can be reduced if theupper limit of the third voltage range is set to be lower.

In operation 270, the processing circuit 124 controls the read and writecircuit 132 to program cells in a target data block 134 using programthreshold voltages within the selected voltage range so as to write datainto the target data block 134.

In the embodiment shown in FIG. 3, each cell of the data block 134 hasan erase threshold voltage interval EV and a plurality of programthreshold voltage intervals V0˜V7. In implementations, the processingcircuit 124 may select the first voltage range VR1 to be the voltagerange of program threshold voltages for the target data block in theoperation 230. The processing circuit 124 may select the third voltagerange VR3 to be the voltage range of program threshold voltages for thetarget data block in the operation 250. The processing circuit 124 mayselect the second voltage range VR2 to be the voltage range of programthreshold voltages for the target data block in the operation 260. Inthis embodiment, the upper limit of the first voltage range VR1 is lessthan 30% of the upper limit of the second voltage range VR2 and thefirst voltage range VR1 comprises the lowest two program thresholdvoltage intervals V0 and V1 within the second voltage range VR2. Inaddition, the upper limit of the third voltage range VR3 is less than60% of the upper limit of the second voltage range VR2 and the thirdvoltage range VR3 comprises the lowest four program threshold voltageintervals V0, V1, V2, and V3 within the second voltage range VR2.

For example, when the communication interface 126 receives a first dataD1 to be written transmitted from the host device 110, if the amount ofstored data in the flash memory module 130 at that time is less than thefirst threshold TH1, the processing circuit 124 may select the firstvoltage range VR1 to be the voltage range of program threshold voltagefor a target data block, such as a first data block 134A, and controlthe read and write circuit 132 to program cells in the first data block134A using program threshold voltages within the first voltage range VR1so as to write the first data D1 into the first data block 134A under anone-bit-per-cell mode, a.k.a. 1bpc mode hereinafter.

Afterward, when the communication interface 126 receives a second dataD2 to be written transmitted from the host device 110, if the amount ofstored data in the flash memory module 130 at that time is between thefirst threshold TH1 and the second threshold TH2, the processing circuit124 may select the third voltage range VR3 to be the voltage range ofprogram threshold voltage for a target data block, such as a second datablock 134G, and control the read and write circuit 132 to program cellsin the second data block 134G using program threshold voltages withinthe third voltage range VR3 so as to write the second data D2 into thesecond data block 134G under a two-bit-per-cell mode, a.k.a. 2bpc modehereinafter.

Afterward, when the communication interface 126 receives a third data D3to be written transmitted from the host device 110, if the amount ofstored data in the flash memory module 130 at that time is higher thanthe second threshold TH2, the processing circuit 124 may select thefirst voltage range VR2 to be the voltage range of program thresholdvoltage for a target data block, such as a third data block 134P, andcontrol the read and write circuit 132 to program cells in the thirddata block 134P using program threshold voltages within the secondvoltage range VR2 so as to write the third data D3 into the third datablock 134P under a three-bit-per-cell mode, a.k.a. 3bpc modehereinafter.

In other words, different data blocks 134 of the flash memory module 130may have different data storage modes at the same time. For example, inthe previous embodiment, when the read and write circuit 132 justfinished writing the third data D3 into the third data block 134P, thedata storage mode of the third data block 134P is the 3bpc mode. At thesame time, the data storage mode of the first data block 134A is the1bpc mode and the data storage mode of the second data block 134G is the2bpc mode.

In addition, when deciding the voltage range of program thresholdvoltages for a target data block, the processing circuit 124 may alsotake the property of the data to be written into consideration. Forexample, FIG. 4 shows a simplified flowchart 400 illustrating a methodfor writing data into flash memory in accordance with a second exampleembodiment, and FIG. 5 shows a simplified flowchart 500 illustrating amethod for writing data into flash memory in accordance with a thirdexample embodiment.

In the embodiment shown in FIG. 4, when the communication interface 126receives a fourth data D4 to be written transmitted from the host device110, the processing circuit 124 firstly performs operation 415 todetermine whether the fourth data D4 is cold data. The term “cold data”as used herein refers to a type of data that is expected will not befrequently accessed. The processing circuit 124 may determine whetherthe fourth data D4 is cold data or not according to the file type, fileextension, logical address of the fourth data D4, or other criteria. Ifthe processing circuit 124 determines that the fourth data D4 is colddata, the processing circuit 124 proceeds to the operation 260.Otherwise, the processing circuit 124 proceeds to the operation 220.

In the embodiment shown in FIG. 5, when the communication interface 126receives a fifth data D5 to be written transmitted from the host device110, the processing circuit 124 firstly performs operation 515 todetermine whether the fifth data D5 is hot data. The term “hot data” asused herein refers to a type of data that is expected will be frequentlyaccessed. The processing circuit 124 may determine whether the fifthdata D5 is hot data or not according to the file type, file extension,logical address of the fifth data D5, or other criteria. If theprocessing circuit 124 determines that the fifth data D5 is hot data,the processing circuit 124 proceeds to the operation 230. Otherwise, theprocessing circuit 124 proceeds to the operation 220.

In another embodiment, the processing circuit 124 may determine whetherthe fifth data D5 is cold data or hot data first. If the processingcircuit 124 determines that the fifth data D5 is hot data, it proceedsto the operation 230; if the processing circuit 124 determines that thefifth data D5 is cold data, it proceeds to the operation 260; and if theprocessing circuit 124 determines that the fifth data D5 is not hot datanor cold data, it proceeds to the operation 220.

In operations, the processing circuit 124 may also record a number oftimes each data block 134 was written under the 1bpc mode, a number oftimes each data block 134 was written under the 2bpc mode, and/or anumber of times each data block 134 was written under the 3bpc mode inthe recording medium 122. For facilitating or simplifying the recordingoperation, the processing circuit 124 may record a number of times thedata block 134 was erased under a particular mode, such as the 1bpcmode, the 2bpc mode, or the 3bpc mode, to be a representative value ofthe number of times the data block 134 was written under the particularmode. In the operation 270 described previously, the processing circuit124 may select an appropriate data block 134 to be the target data blockaccording to the information recorded in the recording medium 122, sothat different data blocks can be evenly written under a particular modeto avoid overutilization of particular data blocks.

In addition, the processing circuit 124 may also record the usagesituation of data blocks 134 of the flash memory module 130 in therecording medium 122, and decide whether to combine contents stored insome data blocks into a data block with sufficient storage capacity torelease more data blocks for later usage.

For example, the processing circuit 124 may record an amount of datablocks in use within the flash memory module 130 in the recording medium122, and combine contents stored in some data blocks into a data blockhaving sufficient storage capacity when the amount of data blocks in useis higher than a third threshold TH3. Alternatively, the processingcircuit 124 may record an amount of empty data blocks within the flashmemory module 130 in the recording medium 122, and combine contentsstored in some data blocks into a data block having sufficient storagecapacity when the amount of empty data blocks is lower than a fourththreshold TH4.

When combining contents stored in different data blocks, the processingcircuit 124 may control the read and write circuit 132 to write validdata stored in one or more candidate data blocks containing data writtenunder the 1bpc mode, such as the data blocks 134A and 134B, into atarget data block, such as the data block 134H or 134Q, under the 2bpcmode or 3bpc mode, and to erase the candidate data blocks. Theprocessing circuit 124 may control the read and write circuit 132 towrite valid data stored in one or more candidate data blocks containingdata written under the 2bpc mode, such as the data blocks 134G and 134H,into a target data block, such as the data block 134P or 134Q, under the3bpc mode, and to erase the candidate data blocks. The processingcircuit 124 may control the read and write circuit 132 to write validdata stored in a first candidate data block containing data writtenunder the 1bpc mode, such as the data block 134A or 134B, into a targetdata block, such as the data block 134P or 134Q, under the 3bpc mode, towrite valid data stored in a second candidate data block containing datawritten under the 2bpc mode, such as the data block 134G or 134H, intothe target data block, such as the data block 134P or 134Q, under the3bpc mode, and to erase the first and second candidate data blocks.

Since the processing circuit 124 dynamically adjusts the voltage rangeof program threshold voltages for the target data block 134 to bewritten according to the amount of stored data in the flash memorymodule 130, the same data block 134 may be configured to have differentprogram threshold voltage ranges at different points of time. Forexample, when the amount of stored data in the flash memory module 130is less than the first threshold TH1, if the data block 134Q is selectedas the target data block, then the processing circuit 124 may controlthe read and write circuit 132 to program cells in the target data block134Q using program threshold voltages within the first voltage range VR1so as to write data into the target data block 134Q under the 1bpc mode.

The data block 134Q may be erased due to various causes in the lateroperations. When the amount of stored data in the flash memory module130 is increased to a level between the first threshold TH1 and thesecond threshold TH2, if the data block 134Q is again selected to be atarget data block, the processing circuit 124 may control the read andwrite circuit 132 to program the cells in the target data block 134Qusing program threshold voltages within the third voltage range VR3 soas to write new data into the target data block 134Q under the 2bpcmode.

Afterward, the data block 134Q may be again erased due to various causesin the later operations. When the amount of stored data in the flashmemory module 130 is increased to a level higher than the secondthreshold TH2, if the data block 134Q is again selected to be a targetdata block, the processing circuit 124 may control the read and writecircuit 132 to program the cells in the target data block 134Q usingprogram threshold voltages within the second voltage range VR2 so as towrite new data into the target data block 134Q under the 3bpc mode.

As described previously, the processing circuit 124 dynamically adjuststhe voltage range of program threshold voltages for the target datablock 134 to be written according to the amount of stored data in theflash memory module 130, or even directly assigns program thresholdvoltages to be used by the read and write circuit 132 when writing datainto the target data block 134. When the amount of stored data in theflash memory module 130 reaches a lower level, the processing circuit124 controls the read and write circuit 132 of the flash memory module130 to program the data block 134 using lower program thresholdvoltages, such as threshold voltages within the voltage interval V0 orthreshold voltages within the voltage interval V1 of FIG. 3. This notonly reduces required power consumption for writing data into the datablock, but also effectively improves the wear capacity of the cells ofthe flash memory module 130, thereby increasing the reliability of datastored in the flash memory module 130.

In addition, since the program threshold voltages of the data block 134can be assigned by the processing circuit 124, the processing circuit124 may also directly assign the read threshold voltage to be used bythe read and write circuit 132 when reading data from the target datablock 134, thereby increasing data reading speed of the flash memorymodule 130.

Thus, by using the above control method of the flash memory controller120, the flash memory module 130 is allowed to provide high storagecapacity with low cost when realized by the MLC chips, TLC chips, oreven higher-level chips, and the endurance, wear capacity, and datareliability of the flash memory module 130 can also be effectivelyimproved. Such architecture is beneficial not only for saving powerconsumption, but also for expediting the promotion and applications ofsolid-state disks.

Other embodiments of the invention will be apparent to those skilled inthe art from consideration of the specification and practice of theinvention disclosed herein. It is intended that the specification andexamples be considered as exemplary only, with a true scope and spiritof the invention being indicated by the following claims.

Those skilled in the art will readily observe that numerousmodifications and alterations of the device and method may be made whileretaining the teachings of the invention. Accordingly, the abovedisclosure should be construed as limited only by the metes and boundsof the appended claims.

What is claimed is:
 1. A method for controlling a flash memory module,wherein the flash memory module comprises a plurality of blocks, and themethod comprising: receiving data from a host device; and determining ifthe data is cold data; if it is determined that the data is the colddata, using at least four of program threshold voltage intervals towrite the data into one of the blocks; if it is determined that the datais not the cold data, referring to an amount of stored data in the flashmemory module to select at least a portion of the program thresholdvoltage intervals to write the data into the one of the blocks.
 2. Themethod of claim 1, wherein the plurality of data blocks are realized bytriple-level cells (TLCs), and the blocks supports eight plurality ofprogram threshold voltage intervals.
 3. The method of claim 1, whereinthe step of determining if the data is the cold data comprises:determining if the data is the cold data according to a file type, afile extension, or a logical address of the data.
 4. The method of claim1, wherein the step of referring to the amount of the stored data in theflash memory module to select at least a portion of the programthreshold voltage intervals to write the data into the one of the blockscomprises: if the amount of stored data in the flash memory module isless than a first threshold, using only two of the program thresholdvoltage intervals to write the data into one of the blocks; and if theamount of stored data in the flash memory module is greater than thefirst threshold, using at least four of the program threshold voltageintervals to write the data into the one of the blocks.
 5. The method ofclaim 4, wherein the step of using only two of the program thresholdvoltage intervals to write the data into one of the blocks comprises: ifthe amount of stored data in the flash memory module is less than thefirst threshold, using only the lowest two of program threshold voltageintervals to write the data into the one of the blocks.
 6. The method ofclaim 4, wherein the step of using at least four of the programthreshold voltage intervals to write the data into the one of the blockscomprises: if the amount of stored data in the flash memory module isgreater than the first threshold, using only the lowest four of theprogram threshold voltage intervals to write the data into the one ofthe blocks.
 7. A method for controlling a flash memory module, whereinthe flash memory module comprises a plurality of blocks, and the methodcomprising: receiving data from a host device; and determining if thedata is hot data; if it is determined that the data is the hot data,using only two of program threshold voltage intervals to write the datainto one of the blocks; if it is determined that the data is not the hotdata, referring to an amount of stored data in the flash memory moduleto select at least a portion of the program threshold voltage intervalsto write the data into the one of the blocks.
 8. The method of claim 7,wherein the plurality of data blocks are realized by triple-level cells(TLCs), and the blocks supports eight plurality of program thresholdvoltage intervals.
 9. The method of claim 7, wherein the step ofdetermining if the data is the hot data comprises: determining if thedata is the hot data according to a file type, a file extension, or alogical address of the data.
 10. The method of claim 7, wherein the stepof referring to the amount of the stored data in the flash memory moduleto select at least a portion of the program threshold voltage intervalsto write the data into the one of the blocks comprises: if the amount ofstored data in the flash memory module is less than a first threshold,using only two of the program threshold voltage intervals to write thedata into one of the blocks; and if the amount of stored data in theflash memory module is greater than the first threshold, using at leastfour of the program threshold voltage intervals to write the data intothe one of the blocks.
 11. The method of claim 10, wherein the step ofusing only two of the program threshold voltage intervals to write thedata into one of the blocks comprises: if the amount of stored data inthe flash memory module is less than the first threshold, using only thelowest two of program threshold voltage intervals to write the data intothe one of the blocks.
 12. The method of claim 10, wherein the step ofusing at least four of the program threshold voltage intervals to writethe data into the one of the blocks comprises: if the amount of storeddata in the flash memory module is greater than the first threshold,using only the lowest four of the program threshold voltage intervals towrite the data into the one of the blocks.